import {defineStore} from "pinia";
import {type} from "../model/type";

export const useNotifyStore=defineStore('notify',{
    state(){
        return{
            messages:[] as type.NotifyMessage[]
        }
    },
    getters: {},
    actions:{
        Message(message :type.NotifyMessage){
            this.messages.push(message)
        },
        Close(index:number){
            this.messages.splice(index,1)
        },
        Clear(){

        },
        GetMessage():any[]{
            return this.messages
        }
    }
})